package com.bai.easyui.test;

import com.bai.easyui.Dao.UserDao;
import com.bai.easyui.DaoImp.UserDaoImp;
import com.bai.easyui.bean.User;
import org.junit.Test;

import java.util.List;

/**
 * Created by Admin on 2/12 0012.
 */
public class UD {
    @Test
    public void test(){
        UserDao userDao=new UserDaoImp();
        List<User> userList=userDao.getAll();
        System.out.println(userList);

        int[ ] arr=new int[]{12,34,0,-34,-2,67,};
        for(int i=0; i<arr.length-1;i++){
            for(int j=0;j<arr.length-1;j++){
                if(arr[j]>arr[j+1]){
                    int temp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+",");
        }
    }
}
class Singleton{
    private static Singleton instance;
    private  Singleton(){}
    private static Singleton getInstance(){
        if(instance==null){
            instance=new Singleton();
        }
        return instance;
    }
}
class Singleton2{
    private static class MySingleton{
        private static final Singleton2 INSTANCE=new Singleton2();
    }
    private  Singleton2(){}
    public static final Singleton2 getInstance2(){
        return MySingleton.INSTANCE;
    }

}